import 'package:flutter/material.dart';

class UButton {
  static getCircleButton(String text,
      {Color color = Colors.white,
      Color backgroundColor = Colors.black,
      double fontSize = 16,
      double borderWidth = 0,
      Color borderColor = Colors.transparent,
      required double width,
      required double height,
      required VoidCallback? onPressed}) {
    return SizedBox(
        width: width,
        height: height,
        child: ElevatedButton(
            onPressed: () {
              onPressed!();
            },
            style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(backgroundColor),
                shape: MaterialStateProperty.all(const StadiumBorder(
                    side: BorderSide(
                        style: BorderStyle.solid, color: Colors.transparent))),
              side: MaterialStateProperty.all(BorderSide(width: borderWidth, color: borderColor)),
            ),
            child: Text(text,
                style: TextStyle(color: color, fontSize: fontSize))));
  }

  static getRoundRectButton(String text,
      {Color color = Colors.white,
        Color backgroundColor = Colors.black,
        double fontSize = 16,
        double radius = 0,
        double borderWidth = 0,
        Color borderColor = Colors.transparent,
        required double width,
        required double height,
        required VoidCallback? onPressed}) {
    return SizedBox(
        width: width,
        height: height,
        child: ElevatedButton(
            onPressed: () {
              onPressed!();
            },
            style: ButtonStyle(
              backgroundColor: MaterialStateProperty.all(backgroundColor),
              shape: MaterialStateProperty.all(RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(radius),
              ),),
              side: MaterialStateProperty.all(BorderSide(width: borderWidth, color: borderColor)),
            ),
            child: Text(text,
                style: TextStyle(color: color, fontSize: fontSize))));
  }
}